package com.crm.mapper;

import com.crm.entity.SysDictData;
import com.crm.entity.TbCourse;
import com.crm.dto.CoursePageDto;
import com.crm.vo.TbCourseVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {
    //课程分页查询
    List<TbCourse> list(CoursePageDto coursePageDto);
    //课程添加
    void save(TbCourse tbCourse);
    //
    @Delete("delete from tb_course where id =#{id}")
    void CourseDeleteId(Long id);

    @Select("select * from  tb_course where id=#{id}")
    TbCourseVo CourseById(Long id);

    @Select("select * from sys_dict_data where dict_type=#{dictType}")
    List<SysDictData> getSubject(String dictType);

    void update(TbCourse tbCourse);
}
